@import "~antd/lib/style/themes/default.less";

.plugins {
  :global {
    .ant-list-item {
      display: flex;
      overflow: hidden;
      position: relative;
      padding: 0;
      border-radius: 16px;
      background-color: #fff;
      box-shadow: 0px 5px 15px 5px rgba(0, 0, 0, 0.14);
      margin-bottom: 24px;

      .ant-list-item-meta {
        padding: 12px 24px;
        z-index: 1;
      }

      .ant-list-item-action {
        min-width: 120px;
      }

      &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 16px;
        bottom: 0;
        background-color: @primary-color;
      }
    }

    .ant-progress {
      padding: 0 !important;
      position: absolute;
      top: 0;
      left: 0;
      opacity: .2;
      height: 100%;
      width: 100%;
      z-index: 0;

      & * {
        height: 100% !important;
      }

      .ant-progress-outer {
        padding: 0px !important;
        margin: 0px !important;

        .ant-progress-inner {
          background-color: transparent;
        }

        .ant-progress-bg {
          height: 100% !important;
          border-radius: 0px !important;
          transition: all 1s;
        }
      }

      .ant-progress-text {
        display: none;
      }
    }
  }

  .img {
    float: left;
    width: 90px;
    height: 80px;
    background-blend-mode: lighten;
    background-size: cover;
  }
}

.active {
  :global {
    .ant-list-item-meta-title>a {
      color: @primary-color;
    }
  }
}

.inactive {
  background-color: #f5f5f5 !important;

  &::before {
    background-color: @disabled-color  !important;
  }

  .img {
    filter: grayscale(100%);
    filter: gray;
  }
}

.installing {
  background-color: #f5f5f5 !important;

  &::before {
    background-color: @primary-color  !important;
  }

  :global {
    .ant-progress-inner {
      .ant-progress-bg {
        background-color: @primary-color;
      }
    }
  }
}

.uninstalling {
  background-color: #fff !important;

  &::before {
    background-color: @disabled-color  !important;
  }

  :global {
    .ant-progress-inner {
      .ant-progress-bg {
        background-color: @disabled-color;
      }
    }
  }
}


@media (max-width: 768px) {
  :global {
    .ant-list-item-action {
      width: 100%;
      margin-bottom: 12px;
      text-align: center;
    }
  }
}